package along.com.myboxugu.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import along.com.myboxugu.R;

public class Loading_activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loading_activity);
        Thread  thread =new Thread(){         //子线程
            @Override
            public void run() {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                Intent intent = new Intent(Loading_activity.this,MainActivity.class);//跳转
                startActivity(intent);  //跳转
                super.run();
            }
        };
        thread.start();//开始线程

    }

}
